package com.action.addrbook;

import com.db.addrbook.CategoryDAO;

public class CategoryDeleteAction {
	private int cno;
	private CategoryDAO caDAO;
	
	public void setCaDAO(CategoryDAO caDAO) {
		this.caDAO = caDAO;
	}
	public void setCno(int cno) {
		this.cno = cno;
	}
	
	public String execute(){
		String result = "";	
		try {			
			result = "success";
			caDAO.deleteCategory(cno);
		} catch (Exception e) {
			result = "error";
			System.out.println("CategoryDeleteAction.execute():"+e.toString());
		}
		return result;	
	}	
}
